//显示拓扑图的设备信息
<template>
  <div class="itemDiv2">
    <!-- 列表展示 -->
    <div v-for="(item, index) in dataList" :key="index">
      <div class="rowStyle">
        <div class="textStyle">{{ item.label }}</div>
        <div class="itemDiv">
          <div v-for="(items, indexs) in item.subData" :key="indexs">
            <div class="itemDiv2">
              <div class="itemBox">
                <el-image
                  style="width: 100px; height: 100px; cursor: pointer"
                  :src="items.image"
                  fit="fit"
                />
                <div>{{ items.label }}</div>
              </div>
              <div
                class="itemBox"
                v-if="
                  indexs != item.subData.length - 1 ||
                  index != dataList.length - 1
                "
                style="cursor: pointer"
              >
                <el-divider content-position="center">{{
                  items.number
                }}</el-divider>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { nodeCategory } from "@/enums/DevEnum"; // 设备枚举
export default {
  props: {
    dataList: {
      type: Array,
      default: function () {
        return [];
      },
    },
  },
  data() {
    return {
      deviceType: "",
      nodeCategory,
    };
  },
  methods: {},
  mounted() {
    console.log("dataList", this.dataList);
  },
};
</script>
<style lang="scss" scoped>
.itemDiv {
  height: 200px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: nowrap;
  border: 2px dashed #333;
  margin-right: 20px;
}
.itemDiv2 {
  height: 300px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: nowrap;
}
.textStyle {
  // line-height: 70px;
  font-size: 14px;
  // width: 100px;
  height: 50px;
  margin-left: 20px;
  width: auto;
  text-align: left;
}
.itemBox {
  height: 150px;
  width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.rowStyle {
  display: flex;
  flex-direction: column;
  // justify-content: center;
  align-content: space-around;
  // align-items: flex-start;
  flex-wrap: wrap;
}
</style>
